<?php

session_start();


$device = $_GET['dev'];

//var_dump($device);
switch($device)
{
	case "screen":	$_SESSION['my_device'] = "screen"; break;
	case "mobile": 	$_SESSION['my_device'] = "mobile"; break;
	default: 	
		{
			// If there's no session set, autodetect by default.
			$_SESSION['my_device'] 	= "autodetect";
			$_SESSION['css']		= "css/core.css";
			

		}
		break;
}

//var_dump($_SESSION['device']);
/*
if(!is_null($referer))
	header("Location: $referer");
else
	header("Location: index.php");
	*/

header("Location: index.php");
?>